<template lang="html">
  <div class="main-page" id="loan-page">
    <!-- 标题 -->
    <nav-bar :title="'确认订单'"/>
    <!-- 主体内容 -->
    <div class="main-content has-main-tabbar has-header-space">
      <div v-if="orderlist" style="overflow-x:hidden;">
      <!-- 地址 -->
      <div class="address" bindtap="addAddress">
       <template v-if="!udId">
        <div style="display:inline-block;font-size:15px;color;#17273A;">请添加您的收货地址</div>
         <van-icon @click="addAddress" size="16px" name="arrow" color="#999999"/>
       </template>
        <template v-else>
          <!-- :style="{padding-right: shippingName.length > 5 ? '': '60rpx'}" -->
        <span class="address-name">{{shippingName}}</span>
        <span v-if="shippingName.length > 5" style="padding-right:60rpx;">...</span>
        <span class="address-mobile">{{shippingMobile}}</span>
        <van-icon @click="addAddress" size="16px" name="arrow" color="#999999"/>
          <div class="address-item">{{shippingAddress}}</div>
        </template>
        <img style="position:absolute;bottom:0;left:0;width:100%;height:5px;" src="https://mjmh.meijiameihuo.com/wechat/images/shopping_cart/line.png" alt="" />
      </div>
        <!-- 展示 -->
         <div class="logistics-item" v-for="(store_items, storeindex) in orderlist.items" :key="storeindex" :index="storeindex">
            <div class="shopping-info-container" v-for="(item, itemindex) in store_items.items" :index="itemindex" :key="itemindex">
             <img class="shopping-info-container__image" :src="item.product_image" alt=""/>
              <div class="shopping-info-container__content">
                <div class="shopping-info-container__name">
                  <span>{{item.product_name}}</span>
                </div>
                <div v-if="item.item_spec_name" class="shopping-info-container__specifications">
                  <span>{{item.item_spec_name}}</span>
                </div>
               <div class="shopping-info-container__label">
                <template v-for="(tab_names, tab_names_index) in item.activity_tab_names" :index="tab_names_index" >
                <div v-if="tab_names === '券'" class="coupon" :key="tab_names_index">{{tab_names}}</div>
                <span v-else-if="tab_names === '限时秒杀'" class="label-name" :key="tab_names_index">{{tab_names}}</span>
                <div v-else class="discount" :key="tab_names_index">{{tab_names}}</div>
              </template>
            </div>
                <div class="shopping-info-container__price-info">
                  <span class="shopping-info-container__price">¥{{item.activity_item_price ? item.activity_item_price : item.item_unit_price}}</span>
                  <span class="shopping-info-container__number">x{{item.cart_quantity}}</span>
                </div>
              </div>
           </div>
        </div>
            <!-- 备注 -->
          <div class="remake-info" v-show="couponsShow ? false : true">
           <van-field :disabled="couponsShow" :type="inputType" autosize maxlength="200" label="备注" v-model="remake" clearable placeholder="不接受指定快递，特殊要求请联系卖家" input-align="right" @change="getremakeValue" @clear="clear"></van-field>
         </div>
      <!-- 优惠券 -->
        <div class="remake-info" v-if="orderlist.whether_coupons_available">
          <div style="position:relative;">
            <div v-if="couponlist.length !== 0" style="position:absolute;top:0;left:0;width:800px;height:50px;z-index:5;" @click="selectCoupons"></div>
            <van-field  v-if="couponlist.length !== 0" readonly v-model="shopCoupons" label="优惠券" clearable placeholder="有可用优惠券，请选择" input-align="right" icon="arrow" @click-icon="selectCoupons" ></van-field>
            <van-field  v-else disabled value="暂无可用优惠券" label="优惠券" placeholder="暂无可用优惠券" input-align="right" icon="arrow" ></van-field>
        <!-- 优惠券弹出框 -->
            <van-popup v-model="couponsShow" position="bottom" bind:click-overlay="couponsCloseShop" >
             <van-cell :border="borders">
              <van-icon class="coupons-title-text" name="cross" @click="couponsCloseShop"/>
                <div slot="title">
                  <div class="coupons-title-text">选择优惠券</div>
                </div></van-cell> <div>
                  <template v-if="couponlist.length !== 0">
                  <van-radio-group v-model="shopCoupons" class="radio-group" @change="radioChange">
                  <van-cell title="不使用优惠券" clickable>
                    <!-- :data-names="'不使用'" :data-price="" -->
                   <van-radio class="radio no-coupon" checked-color="#E91F3F" :name="'不使用'" @click="getShowValue"></van-radio>
                  </van-cell>
                    <div class="coupon-list">
                     <select-coupon v-for="(item, index) in couponlist" :key="index" :item="item">
                      <div slot="radio" class="coupon_stats">
                        <!-- :data-names="item.voucher_subtotal" :data-price="item.voucher_price" -->
                      <van-radio class="coupon-radio" checked-color="#E91F3F" :name="item.user_voucher_id" @click="getShowValue"></van-radio>
                    </div>
                     </select-coupon>
                   </div>
                  </van-radio-group>
                  </template>
                 <template v-else> <van-cell title="暂无可用优惠券" ></van-cell></template></div>
              <van-button size="large" type="danger" class="coupons-btn" @click="clickcouponsBtn">确定</van-button>
           </van-popup>
        </div>
      </div>
          <!-- 价格信息 -->
        <div class="show-price">
          <van-cell-group>
            <van-cell title="商品总额" :value="'￥' + orderlist.orderSelMoneyAmount" value-class="shop-price"/>
            <van-cell title="运费" :value="'+￥' + orderlist.freight" value-class="order-price"/>
             <van-cell title="优惠券" :value="'-￥' + coupons" value-class="order-price"/>
          </van-cell-group>
        </div>
        <!-- 提交按钮 -->
          <van-submit-bar :disabled="disabled" v-if="isAddress && !couponsShow" button-text="提交订单" @submit="subOrder" button-class="sub-btn">
            <div class="shop-ck">总金额：</div>
            <div style="display:inline-block;font-size:18px;color:#E91F3F;font-weight:bold;">￥{{orderPaymentAmount > 0 ? orderPaymentAmount : 0}}</div>
          </van-submit-bar>
            <template v-else>
            <van-button size="large" class="address-btn" @click="addAddress">请先选择添加收货地址</van-button>
          </template>
      </div>
      <van-loading  v-else type="spinner" color="#fff" />
      <van-toast id="van-toast" />
      <van-dialog id="van-dialog" />
    </div>
  </div>
</template>

<script>
import NavBar from '@/components/global/nav-bar.vue'
import SelectCoupon from '@/components/shop/select_coupon.vue'
import { debounce } from 'throttle-debounce'

export default {
  components: { NavBar, SelectCoupon },
  data () {
    return {
      active: 2,
      ifcart: '',
      cart_id: '',
      orderlist: {},
      couponlist: [],
      shippingMobile: '',
      shippingName: '',
      shippingAddress: '',
      udId: null,
      orderId: '',
      remake: '',
      showBoxView: false,
      shopCoupons: null,
      userVoucherId: '',
      coupons: 0,
      isAddress: false,
      disabled: false,
      couponsShow: false,
      invoiceShow: false,
      noCoupons: false,
      isChange: false,
      isChange1: false,
      isChange2: false,
      checked: false,
      orderPaymentAmount: null,
      debounceNumber: null,
      isTmplMsg: !0,
      radio: null,
      isGiftBag: '',
      activity_type_name: '',
      isLimit: '',
      voucher: [],
      inputType: 'text',
      is_show: false,
      merchant_code: '',
      borders: false
    }
  },
  created () {
    console.log(this.$route)
    if (this.$route.query) {
      this.ifcart = this.$route.query.ifcart
      this.item_id = this.$route.query.item_id ? this.$route.query.item_id : ''
      this.quantity = this.$route.query.quantity ? this.$route.query.quantity : ''
      this.activity_type_name = this.$route.query.activity_type_name ? this.$route.query.activity_type_name : ''
      this.isGiftBag = this.$route.query.is_gift_bag ? this.$route.query.is_gift_bag : ''
      this.isLimit = this.$route.query.is_limit ? this.$route.query.is_limit : ''
      this.merchant_code = this.$route.query.merchant_code ? this.$route.query.merchant_code : ''
    }
    this.settlement(this.$route.query.ifcart, this.$route.query.item_id, this.$route.query.quantity) // 确认订单页面获取订单信息
    this.getAddressList()
  },
  mounted () {
    if (this.shippingAddress === '' && this.shippingName === '' && this.shippingMobile === '' && this.udId === '') {
      this.getAddressList()
    }
    if (this.udId) {
      this.isAddress = true
    }
    this.debounceNumber = debounce(400, (t) => {
      this.submitOrder()
    })
  },
  methods: {
    radioChange (value) {
      console.log(value)
      this.userVoucherId = value
    },
    getShowValue (e) {
      // this.coupons = val2
      // this.shopCoupons = val1 ? val1 : '优惠￥' + val2
    },
    openMsg: function () {
      console.log('打开客服')
    },
    addAddress () { // 选择收获地址
      this.$router.push('/pages/personal_center/shipping-address/shipping-address?type=select')
    },
    getremakeValue (e) { // 获取备注值
      this.remake = e.detail
      this.inputType = 'textarea'
    },
    clear () {
      this.inputType = 'text'
    },
    selectCoupons () { // 优惠弹窗展示
      this.couponsShow = true
    },
    couponsCloseShop () { // 优惠弹窗关闭
      this.couponsShow = false
    },
    payCloseShop () { // 支付弹窗关闭
      this.payShow = false
    },
    getValue (e) {
      this.invoice_info = e.currentTarget.dataset.value
      if (!this.isChange) {
        this.isChange = true
      } else {
        this.isChange = false
      }
    },
    getValue1 (e) {
      this.invoice_type = e.currentTarget.dataset.value
      if (!this.isChange1) {
        this.isChange1 = true
      } else {
        this.isChange1 = false
      }
    },
    getValue2 (e) {
      this.invoice_title = e.currentTarget.dataset.value
      console.log(e.currentTarget.dataset.value)
      if (!this.isChange2) {
        this.isChange2 = true
      } else {
        this.isChange2 = false
      }
    },
    noCoupon (e) { // 不使用
      this.noCoupons = true
    },
    clickcouponsBtn (e) { // 点击确定调接口
      if (this.userVoucherId === '不使用') {
        this.coupons = 0
        this.shopCoupons = '不使用'
      } else {
        var val1 = this.couponlist.find(item => item.user_voucher_id === this.userVoucherId)
        var val2 = this.couponlist.find(item => item.user_voucher_id === this.userVoucherId)
        console.log(val1, val2.voucher_price)
        this.coupons = val2.voucher_price
        this.shopCoupons = val1.voucher_subtotal ? val1.voucher_subtotal : '优惠￥' + val2.voucher_price
      }
      // var result = this.numSub(this.orderlist.orderSelMoneyAmount, this.coupons ? this.coupons : 0)
      // var newResult = this.numAdd(result, this.orderlist.items[0].freight ? this.orderlist.items[0].freight : 0)
      this.couponsShow = false
      this.orderPaymentAmount = 123
    },
    getCouponsList (params) { // 获取可用优惠卷列表
      var data = { products: params }
      return new Promise((resolve, reject) => {
        this.$Axios({ url: '/coupons_available', data, method: 'post' }).then((res) => {
          if (res.return_code === '0000') {
            if (res.data) {
              this.couponlist = res.data.list
            }
            console.log('请求成功')
          } else { console.log('请求错误') }
          resolve()
        }).catch((error) => {
          console.log('请求失败', error)
        })
      })
    },
    getAddressList () { // 获取地址列表
      var params = {}
      this.$Axios({ url: '/shop_user_delivery_address?page=0', params, method: 'get' }).then((res) => {
        console.log('获取地址列表:', res)
        if (res.return_code === '0000') {
          if (res.data.list.length !== 0) {
            this.isAddress = true
            var list = res.data.list
            var defaultItem = list.find(item => item.ud_is_default === 1)
            console.log(defaultItem)
            if (defaultItem) {
              this.shippingAddress = defaultItem.ud_province + '' + defaultItem.ud_city + '' + defaultItem.ud_county + '' + defaultItem.ud_address
              this.shippingName = defaultItem.ud_name
              this.shippingMobile = defaultItem.ud_mobile
              this.udId = defaultItem.ud_id
            } else {
              this.shippingAddress = list[0].ud_province + '' + list[0].ud_city + '' + list[0].ud_county + '' + list[0].ud_address
              this.shippingName = list[0].ud_name
              this.shippingMobile = list[0].ud_mobile
              this.udId = list[0].ud_id
            }
          }
        } else {
        }
      }).catch((error) => {
        console.log('获取地址列表失败:', error)
        this.$toast('获取地址列表请求响应失败')
      })
    },
    settlement (ags1, ags2, ags3) { // 获取下单信息
      var data = ags1 === '1' ? {
        ifcart: 1
      } : {
        ifcart: 0,
        item_id: ags2,
        quantity: ags3
      }
      return new Promise((resolve, reject) => {
        this.$Axios({ url: '/order_checkout', data, method: 'post' }).then((res) => {
          if (res.return_code === '0000') {
            if (res.data) {
              // if (this.isLimit === 'true') {
              //   var arr = res.data.items[0].items[0].activity_tab_names.find((item, index) => { return item === '限量' })
              // } else if (this.activity_type_name === '限时折扣') {
              //   var arr = res.data.items[0].items[0].activity_tab_names.find(item => {
              //     return item === '限时秒杀'
              //   })
              // }
              this.orderlist = res.data
              console.log(this.orderlist)
              this.orderlist.items.map((item) => {
                var params = item.items.map((i) => {
                  return {
                    product_id: i.product_id,
                    item_id: i.item_id,
                    quantity: i.cart_quantity
                  }
                })
                console.log(params)
                this.getCouponsList(params) // 获取优惠卷
              })
              // var result = this.numSub(this.orderlist.orderSelMoneyAmount, this.coupons ? this.coupons : 0)
              // var newResult = this.numAdd(result, this.orderlist.freight ? this.orderlist.freight : 0)
              this.orderPaymentAmount = 123
            }
            console.log('请求成功')
          } else {
            console.log('请求错误')
          }
          resolve()
        }).catch((error) => {
          console.log('请求失败', error)
        })
      })
    },
    subOrder () {
      console.log(1111)
      if (this.orderPaymentAmount > 0) {
        this.submit()
      } else {
        this.prompt()
      }
    },
    submit () {
      this.debounceNumber()
    },
    prompt () {
      this.$toast('该商品维护中，请重新下单')
    },
    submitOrder () { // 提交订单
      this.disabled = true
      if (!this.udId) {
        this.isAddress = false
        return
      }
      console.log(this.remake)
      var data = this.userVoucherId ? (this.ifcart === '1' ? {
        ifcart: this.ifcart,
        ud_id: this.udId,
        user_voucher_id: this.userVoucherId,
        invite_code: '',
        order_message: this.remake ? this.remake : ''
      } : {
        ifcart: this.ifcart,
        item_id: this.item_id,
        quantity: this.quantity,
        ud_id: this.udId,
        user_voucher_id: this.userVoucherId,
        invite_code: '',
        order_message: this.remake ? this.remake : ''
      }) : (this.ifcart === '1' ? {
        ifcart: this.ifcart,
        ud_id: this.udId,
        invite_code: '',
        order_message: this.remake ? this.remake : ''
      } : {
        ifcart: this.ifcart,
        item_id: this.item_id,
        quantity: this.quantity,
        ud_id: this.udId,
        invite_code: '',
        order_message: this.remake ? this.remake : ''
      })
      return new Promise((resolve, reject) => {
        this.$Axios({ url: '/submit_orders', data, method: 'post' }).then((res) => {
          if (res.return_code === '0000') {
            this.orderId = res.data.order_id
            this.orderSelMoneyAmount = res.data.orderSelMoneyAmount
            this.disabled = true
            // var result = this.numSub(this.orderlist.orderSelMoneyAmount, this.coupons ? this.coupons : 0)
            // var newResult = this.numAdd(result, this.orderlist.freight ? this.orderlist.freight : 0)
            this.orderPaymentAmount = 123
            this.$toast.success('提交订单成功!')
            setTimeout(() => {
              this.$router.push({ name: '确认支付', query: { order_payment_amount: this.orderPaymentAmount, ifcart: this.ifcart, order_id: this.orderId, expire_date: 12, current_date: 111, merchant_code: this.merchant_code } })
            }, 4000)
          } else {
            this.$toast(res.msg)
          }
          resolve()
        }).catch((error) => {
          this.$toast(error)
          console.log('请求失败', error)
        })
      })
    }
    // numAdd (num1, num2) {
    //   console.log(num1, num2)
    //   var baseNum, baseNum1, baseNum2
    //   if (num1 && num1 % 1 !== 0) {
    //     baseNum1 = num1.toString().split('.')[1].length
    //   } else if (num1 && num1 % 1 === 0) {
    //     baseNum1 = num1
    //   } else {
    //     baseNum1 = 0
    //   }
    //   if (num2 > 0 && num2 % 1 !== 0) {
    //     baseNum2 = num2.toString().split('.')[1].length
    //   } else if (num2 > 0 && num2 % 1 === 0) {
    //     baseNum2 = num2
    //   } else {
    //     baseNum2 = 0
    //   }
    //   console.log((num1 + num2))
    //   return Math.round((num1 + num2) * 100) / 100
    // },
    // numSub (num1, num2) {
    //   console.log(num1, num2)
    //   var baseNum, baseNum1, baseNum2
    //   if (num1 && num1 % 1 !== 0) {
    //     baseNum1 = num1.toString().split('.')[1].length
    //   } else if (num1 && num1 % 1 === 0) {
    //     baseNum1 = num1
    //   } else {
    //     baseNum1 = 0
    //   }
    //   if (num2 > 0 && num2 % 1 !== 0) {
    //     baseNum2 = num2.toString().split('.')[1].length
    //   } else if (num2 > 0 && num2 % 1 === 0) {
    //     baseNum2 = num2
    //   } else {
    //     baseNum2 = 0
    //   }
    //   console.log((num1 - num2))
    //   return Math.round((num1 - num2) * 100) / 100
    // }
  }
}
</script>
<style lang="scss" scoped>
.remake-info{margin-bottom:10px}
.show-price{margin-bottom:60px}
.address-btn{position:fixed!important;bottom:0;color:#fff!important;background-color:#e91f3f!important;z-index:25;}
.coupons-select{width:95%!important;height:100px!important;margin:10px!important;padding:10px 10px 10px 0!important;text-align:center!important;border-radius:10px}
.coupons-title-text{color:#333;font-size:20px}
// .van-col{padding:10px 0;margin:10px 0}
// .van-col--18{padding:0!important;margin:0!important}
.van-button--default{border:0!important}
.coupon-radio{padding:40px 0 40px 48px!important;margin:10px 0!important}
.coupons-select-row{margin-right:10px!important}.coupons-value{display:inline-block!important;flex:none!important}
.coupons-title{display:inline-block!important;flex:none!important}.voucher-price{color:#e91f3f;font-size:24px}
.pay{position:relative!important;background-color:#fff;height:100%}
.pay-container{background-color:#fff;height:400px;text-align:center;padding-top:25px}
.van-popup--safe{
  padding-bottom: 0!important;
}
.shipping-value{
  display: inline-block!important;
  flex: none!important;
}
.coupon-list {
  padding-bottom: 60px;
}
.coupon_item {
  height: 128px;
  background: url('https://mjmh.meijiameihuo.com/wechat/images/home/coupon_center/item_bg.png') center no-repeat;
  background-size: 100%;
  position: relative;
  margin: 10px;
}
.down_icon {
  position: absolute;
  height: 25px;
  width: 25px;
  background: url('https://mjmh.meijiameihuo.com/wechat/images/home/icon_down.png') no-repeat center;
  background-size: 12px;
  top: -2px;
  right: 0;
  background-position: center;
  -webkit-transition: -webkit-transform 0.5s;
  -moz-transition: -moz-transform 0.5s;
  -o-transition: -o-transform 0.5s;
  transition: transform 0.5s;
}

.show {
  animation: rotating 0.6s;
  transform: rotate(180deg);
  -webkit-transform-origin: 50% 50%;
  transform-origin: 50% 50%;
}
.show_coupon_rule {
  font-size: 12px;
  color: #666;
  background: #fff;
  padding: 8px 5px;
  margin: 2px 10px 0 10px;

}
.coupon_info {
  width: 175px;
  margin: 0 0 0 5px;
  padding: 8px 0 9px 85px;
  position: relative;
}

.coupon_item .coupon_info .coupon_info_img {
  display: table;
  position: absolute;
  top: 8px;
  left: 5px;
}

.coupon_item .coupon_info .coupon_info_img .cpupon_img {
  width: 75px;
  height: 75px;
}

.coupon_info_txt {
  display: table;
}
.radio{
  width:22px;
  height:22px;
}
.no-coupon{
  position: absolute;
  top:0;
  left:78%;
  overflow: visible!important;
}
.coupons-btn{
  position:fixed!important;
  bottom:0;
  background-color: #E91F3F!important;
}
.coupon_info_txt .coupon_title {
  font-size: 15px;
  color: #333;
  margin-top: 4px;
  height: 21px;
  font-weight: 400;
  line-height: 21px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.coupon_info_txt .coupon_time {
  height: 17px;
  font-size: 12px;
  font-weight: 400;
  color: rgba(153, 153, 153, 1);
  line-height: 17px;
  margin-top: 3px;
}

.coupon_info_txt .dis_money {
  height: 22px;
  font-size: 14px;
  margin-top: 6px;
  display: flex;
  align-items: center;
}

.dis_money .coupon_money {
  font-size: 14px;
  color: #e91f3f;
  height: 22px;
  line-height: 22px;
}

.dis_money .coupon_condition {
  height: 22px;
  background: rgba(233, 31, 63, 0.08);
  font-size: 11px;
  padding: 0 5px;
  line-height: 22px;
  color: #e91f3f;
  margin-left: 4px;
}

.coupon_hr {
  width: 232px;
  height: 2px;
  background: #f7f7f7;
  margin-left: 6px;
}

.coupon_rule {
  font-size: 12px;
  color: #666;
  margin: 6px 5px;
  height: 17px;
  line-height: 17px;
  width: 230px;
  padding-right: 25px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  position: relative;
}

.coupon_stats {
  /* background: red; */
  width: 89px;
  height: 128px;
  position: absolute;
  right: 0;
  top: 0;
}
.logistics-item {
  margin-top: 10px;
}
/* 物流商品信息 */
.shopping-info-container {
  position: relative;
  background: #fff;
  height: 91px;
  padding: 20px 46px 20px 121px;
  border-bottom: 1px solid #E5E5E5;
}

.shopping-info-container__image {
  position: absolute;
  left: 15px;
  top: 20px;
  width: 91px;
  height: 91px;
}

.shopping-info-container__name {
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  line-height: 20px;
  font-size: 14px;
  font-weight: bold;
  color: #333;
  margin-bottom: 6px;
}

.shopping-info-container__specifications {
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
}

.shopping-info-container__specifications text {
  line-height: 16px;
  font-size: 12px;
  color: #17273A;
  padding: 0 5px;
  background: #F3F3F6;
}
.shopping-info-container__label {
  color: #ffffff;
  font-size: 12px;
  margin-top: 6px;
  height: 14px;
}
.shopping-info-container__label image {
  width: 30px;
  height: 14px;
  margin-right: 5px;
}

.shopping-info-container__price-info {
  position: absolute;
  right: 15px;
  bottom: 40px;
  line-height: 22px;
}
.shopping-info-container__price {
  color: #E91F3F;
  font-size: 16px;
  font-weight: bold;
  margin-right: 10px;
}
.shopping-info-container__number {
  color: #999999;
  font-size: 14px;
}
.order-price{
  color:#E91F3F!important;
}
.shop-price{
  color: #17273A!important;
}

.van-field__input--right{
  color: #17273A!important;
  font-weight: lighter;
}
.van-cell__title,.van-cell__value{
  font-size: 14px!important;
}
.van-cell__value{
  font-weight:bold!important;
}
.no-address{
  position: relative;
  background-color: #FFFFFF;
  padding:15px;
}
.address{
  position: relative;
  /* height:100rpx; */
  background-color: #FFFFFF;
  padding:15px;
}
.address-name{
  color: #17273A;
  font-size: 15px;
  font-weight: bold;
  padding-bottom:5px;

}
.address-mobile{
  color: #17273A;
  font-weight: bold;
  font-size: 15px;
}
.address-item{
  color: #17273A;
  font-size: 13px;
  padding-top:5px;
}
.label-name{
  height:14px;
  line-height:14px;
  text-align:center;
  font-size:12px;
  color:#fff;
  background:#E91F3F;
  margin-right:5px;
  padding:0 5px;
  border-radius:2px;
}
.discount {
 display: inline-block;
  height: 14px;
  border-radius: 2px;
  font-size: 12px;
  text-align: center;
  line-height: 14px;
  color: #fff;
  margin-right: 5px;
  padding: 0 5px;
  background-color: #E91F3F;
}
.coupon {
  display: inline-block;
  width: 20px;
  height: 14px;
  border-radius: 2px;
  font-size: 12px;
  text-align: center;
  line-height: 14px;
  color: #ffffff;
  margin-right: 5px;
  background-image: url('https://mjmh.meijiameihuo.com/wechat/images/home/coupon.png');
  background-size: 100% 100%;
  background-repeat: no-repeat;
}
.sub-btn{background-color:#e91f3f!important;}
.shop-ck{display:inline-block;font-size:14px;color:#333333;margin-left:15px;font-weight:bold;}
</style>
